package com.cmbt.service.impl;

import com.cmbt.bean.Page;
import com.cmbt.bean.Role;
import com.cmbt.dao.api.RoleDao;
import com.cmbt.dao.impl.RoleDaoImpl;
import com.cmbt.service.api.RoleService;

import java.util.List;

public class RoleServiceImpl implements RoleService {
    RoleDao roleDao = new RoleDaoImpl();

    @Override
    public List<Role> queryUserByPage(Page pg) {
        List<Role> roleList = roleDao.selectRoleListByPage(pg);
        return roleList;
    }

    @Override
    public int getTotalPage(int pageSize){
        int totalPage = roleDao.selectTotalPage(pageSize);
        return totalPage;
    }
}
